package stage1.module2;

public class Homework3InternetPlan extends Homework3Plan implements Homework3InternetInterface{
    private double data;

    public Homework3InternetPlan(double data, double cost) {
        this.data = data;
        this.cost = cost;
    }

    @Override
    public void show(){
        System.out.printf("上网流量:%.2f 每月资费:%.2f", data, cost);
        System.out.println();
    }

    @Override
    public void Internet(double data, Homework3Card card) {
        card.setData(data);
        System.out.println("成功开通上网服务");
    }

    public double getData() {
        return data;
    }

    public void setData(double data) {
        this.data = data;
    }
}
